<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box1{
            width: 500px;
            height: 500px;
            background: lightblue;
        }
        .box1cld{
            width: 200px;
            height: 200px;
            background: red;
            position: absolute;
            top: 100px;
            left: 100px;
        }
        .box2{
            width: 500px;
            height: 500px;
            background: green;
            position: relative;
        }
        .box2-cld{
            width: 200px;
            height: 200px;
            background: blue;
            position: absolute;
            top: 200px;
            left: 200px;
        }
    </style>
</head>
<body>
    <div class="box1">
        <div class="box1cld">box1-cld此时脱离文档流，父元素没有定位，相对于浏览器</div>
    </div>
    <div class="box2">
        <div class="box2-cld">box2-cld此时脱离文档流，父元素有定位，相对于父元素</div>
    </div>
</body>
</html>